<div id="content">
    <div id="title">个人信息修改</div>
    <div style="height:30px"></div>
    {switch $Request.session.info.type}
    {case 1}
    <div id="student">
        <table>
            {foreach $userinfo as $v}
            <tr><th>学号：</th><td><input type="number" name="stuid"  value="{$v.stuid}" required onchange="getstuid(this)"></td></tr>
            <tr><th>姓名：</th><td><input type="text" name="name" value="{$v.name}"  required onchange="getname(this)"></td></tr>
            <tr><th>邮箱：</th><td><input type="email" name="email" value="{$v.email}"  required></td></tr>
            <tr><th>手机号码：</th><td><input type="number" name="phone" value="{$v.phone}"  required onchange="getphone(this)"></td></tr>
            <tr><th>系部：</th><td><input type="text" name="apartment" value="{$v.apartment}"  required ></td></tr>
            <tr><th>年级：</th><td><input type="text" name="grade" value="{$v.grade}"  required ></td></tr>
            <tr><th>班级：</th><td><input type="text" name="class" value="{$v.class}"  required></td></tr>
            <tr><td></td><td><input  type="button" value="修　改" onclick="myinfo()"></td></tr>
            <tr><td></td><td><a class="back" href="{:url('center')}">返　回</a></td></tr>
            {/foreach}
        </table>
    </div>
    {/case}

    {case 2}
    <div id="student">
        <table>
            {foreach $userinfo as $v}
            <tr><th>姓名：</th><td><input type="text" name="name" value="{$v.name}" required onchange="getname(this)"></td></tr>
            <tr><th>邮箱：</th><td><input type="email" name="email"value="{$v.email}" required></td></tr>
            <tr><th>手机号码：</th><td><input type="number" name="phone" value="{$v.phone}" required onchange="getphone(this)"></td></tr>
            <tr><th>部门：</th><td><input type="text" name="apartment" value="{$v.apartment}" required ></td></tr>
            <tr><td></td><td><input  type="submit" value="修　改" onclick="myinfo()"></td></tr>
            <tr><td></td><td><a class="back" href="{:url('center')}">返　回</a></td></tr>
            {/foreach}
        </table>
    </div>
    {/case}

    {case 3}
    <div id="student">
        <table>
            {foreach $userinfo as $v}
            <tr><th>姓名：</th><td><input type="text" name="name" value="{$v.name}" required onchange="getname(this)"></td></tr>
            <tr><th>邮箱：</th><td><input type="email" name="email"value="{$v.email}" required></td></tr>
            <tr><th>手机号码：</th><td><input type="number" name="phone" value="{$v.phone}" required onchange="getphone(this)"></td></tr>
            <tr><th>部门：</th><td><input type="text" name="apartment" value="{$v.apartment}" required ></td></tr>
            <tr><td></td><td><input  type="submit" value="修　改" onclick="myinfo()"></td></tr>
            <tr><td></td><td><a class="back" href="{:url('center')}">返　回</a></td></tr>
            {/foreach}
        </table>
    </div>
    {/case}
    {/switch}

</div>